﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YuBianZJH.aspx.cs" Inherits="Web.Pages.YongShui.JiHuaGL.YuBianZJH" Theme="Default" ValidateRequest="false" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../../../../JS/jquery.js"></script>
    <script src="../../../../JS/AddEditCancel.js"></script>
    <script type="text/javascript">
        function keyEnter(index) {
            var controls = new Array();
            controls[0] = document.getElementById("txtBianHao_I");
            controls[1] = document.getElementById("txtMingCheng_I");
            controls[2] = document.getElementById("memoMiaoShu_I");
            var key = event.keyCode;
            if (key == 13) {
                index = index + 1;
                if (index == controls.length) {
                    index = 0;
                }
                controls[index].focus();
            }
        }
        function openCompareToFact() {
            openCenter("/Pages/YongShui/3.JihuaGL/YuBianZJH_CompareToFact.aspx?i_bz=" + encodeURI($("#ASPxPageControl1_tab2cmbBZ_I").val()) + "&i_y=" + $("#ASPxPageControl1_tab2cmbY_I").val(), "685px", "600px");
        }

        function delConfirm(sheshuidxdm, id) {
            if (tab2cmbBZ.GetSelectedIndex()==0&&sheshuidxdm.indexOf("4220") > -1) {
                alert("该用户为系统指定的福利用户,不允许删除。");
                return false;
            }
            else if (tab2cmbBZ.GetSelectedIndex() == 1 && sheshuidxdm.indexOf("4230") > -1) {
                alert("该用户为系统指定的部队用户,不允许删除。");
                return false;
            }
            if (confirm("确认删除吗?")) {
                //alert("执行删除");
                hdCollection.Set("DelUserID", id);
                ASPxCallback1.PerformCallback("DelUser");
            }
        }

        //判断计划执行情况中水量年月合法性
        function judgeYM() {
            var ymSys = hdCollection.Get('ym');
            var inputY = tab1txtY.GetText();
            var inputM = tab1txtM.GetText();
            if (inputY * 100 + Number(inputM) > ymSys) {
                alert("输入的年月份不能大于当前水量年月,请重新输入。");
                return false;
            }
            return true;
        }
       
       
        function validateTab3InportPlan() {
            var ymSys = hdCollection.Get('ym');
            var inputY = tab3txtY.GetText();
            var inputM = tab3txtM.GetText();
            if (inputY == "" || inputM == "") {
                alert("请输入年和月。");
                return false;
            }
            if (inputY * 100 + Number(inputM) > ymSys) {
                alert("输入的年月份不能大于当前水量年月,请重新输入。");
                return false;
            }
            return true;
        }

        function setBtnsEnable(enabled) {
            if (typeof (tab3btnRebuilData) != 'undefined') {
                tab3btnRebuilData.SetEnabled(enabled);
            }
            if (typeof (tab3btnConfirm) != 'undefined') {
                tab3btnConfirm.SetEnabled(enabled);
            }
            if (typeof (tab3btnExport) != 'undefined') {
                tab3btnExport.SetEnabled(enabled);
            }
            if (typeof (tab3btnInport) != 'undefined') {
                tab3btnInport.SetEnabled(enabled);
            }
            if (typeof (tab3btnExportShiYongSL) != 'undefined') {
                tab3btnExportShiYongSL.SetEnabled(enabled);
            }
        }

        function tab1btnRefresh() {
            if (judgeYM()) {
                if (tab1txtJIAJIABL.GetText() == "") {
                    alert("请填写加价倍率！");
                    return;
                }
                tab1gvList1.PerformCallback();
            }
        }

        function tab2cmbChange() {
            if (tab2cmbBZ.GetSelectedIndex() <= 1) {
                tab2btnCompareToFact.SetEnabled(true);
            }
            else {
                tab2btnCompareToFact.SetEnabled(false);
            }
            tab2gvList1.PerformCallback();
        }

        function tab2opDisplay(op) {
            if (op == "add") {
                tab2btnAdd.SetVisible(false);
                tab2btnSave.SetVisible(true);
                tab2btnCancel.SetVisible(true);
                tab2txtYonghuh.SetEnabled(false);
                tab2btnCompareToFact.SetEnabled(false);
            }
            else if (op == "init") {
                tab2btnAdd.SetVisible(true);
                tab2btnSave.SetVisible(false);
                tab2btnCancel.SetVisible(false);
                tab2txtYonghuh.SetText("");
                tab2txtYonghuh.SetEnabled(true);
                tab2btnCompareToFact.SetEnabled(true);
            }
        }
        function tab2Add() {
            if (tab2txtYonghuh.GetText() == "") {
                alert("请填写用户号！");
                return;
            }
            //执行后台验证
            ASPxCallback1.PerformCallback("validate_tab2Add");
        }
        function tab2Save() {
            ASPxCallback1.PerformCallback("tab2Save");
        }
        function tab2Rebuild() {
            ASPxCallback1.PerformCallback("tab2Rebuild");
        }

        function rebuild() {
            var ymSys = hdCollection.Get('ym');
            var inputY = tab3txtY.GetText();
            var inputM = tab3txtM.GetText();
            if (inputY == "" || inputM == "") {
                alert("请输入年和月。");
                return;
            }
            if (inputY < parseInt(ymSys / 100)) {
                alert("来年计划已经下达,不允许再进行本次操作。");
                return;
            }
            if (inputY * 100 + Number(inputM) > ymSys) {
                alert("输入的年月份不能大于当前水量年月,请重新输入。");
                return;
            }
            if (tab3txtBANSHICXX.GetText() == "" || tab3txtBENBUXX.GetText() == "" || tab3txtBENNIANQ.GetText() == "" || tab3txtCHAOJIHTJD.GetText() == "" || tab3txtCHAOJIHTJG.GetText() == "" || tab3txtCHAOJIHTJSX.GetText() == ""
                || tab3txtCHAOJIHTJZ.GetText() == "" || tab3txtCHAOYONGLSX.GetText() == "" || tab3txtCHAOYONGLTJ.GetText() == "" || tab3txtCHAOYONGLYS.GetText() == "" || tab3txtCHAOYONGLYZ.GetText() == "" || tab3txtFULIWCL.GetText() == ""
                || tab3txtFULIWCLXX.GetText() == "" || tab3txtJIAJIABL.GetText() == "" || tab3txtJINNIANQ.GetText() == "" || tab3txtM.GetText() == "" || tab3txtQIANNIANQ.GetText() == "" || tab3txtQUNIANQ.GetText() == "" || tab3txtSHANGNIANQ.GetText() == ""
                || tab3txtWANCHENGLTJ.GetText() == "" || tab3txtWANCHENGLXX.GetText() == "" || tab3txtWANCHENGLYS.GetText() == "" || tab3txtWANCHENGLYZ.GetText() == "" || tab3txtY.GetText() == ""
                ) {
                alert("请将信息填写完整。");
                return;
            }
            LoadPanel.Show();
            setBtnsEnable(false);
            ASPxCallback1.PerformCallback('rebuild');
        }

        function quedingfa() {
            var ymSys = hdCollection.Get('ym');
            var inputY = tab3txtY.GetText();
            var inputM = tab3txtM.GetText();
            if (inputY == "" || inputM == "") {
                alert("请输入年和月。");
                return;
            }
            if (inputY * 100 + Number(inputM) > ymSys) {
                alert("输入的年月份不能大于当前水量年月,请重新输入。");
                return;
            }
            if (confirm("真的确定方案?")) {
                LoadPanel.Show();
                setBtnsEnable(false);
                ASPxCallback1.PerformCallback('quedingfa');
            }
        }

        //导出到EXCEL  
        function tabexport(type) {
            LoadPanel.Show();
            if (type == "1") {
                //计划执行情况
                ASPxCallback1.PerformCallback('tab1export');
            }
            else if (type == "2") {
                //特殊用户
                ASPxCallback1.PerformCallback('tab2export');
            }
            else if (type == "3") {
                //预编制计划导出
                ASPxCallback1.PerformCallback('tab3export');
            }
            else if (type == "4") {
                //预测分析
                ASPxCallback1.PerformCallback('tab4export');
            }
        }
        //预编制计划导入
        function tab3inport()
        {
            ASPxCallback1.PerformCallback('tab3inport');
        }
        function exportNear3yers() {
            LoadPanel.Show();
            setBtnsEnable(false);
            ASPxCallback1.PerformCallback('exportNear3yers');
        }


        //完成列表刷新,如有指定索引,则跳转
        function tab2List1EndCallback(s) {
            tab2lblRowCount.SetText("共有" + s.cpCount + "条记录");
            if (s.cpIndex != null) {
                tab2gvList1.SetFocusedRowIndex(s.cpIndex);
                tab2gvList1.MakeRowVisible(s.cpIndex);
            }
        }
        function tabChange(s, e)
        {
            //if (ASPxPageControl1.activeTabIndex == 2) {
                tab4lblBenBuFA.SetText(hdCollection.Get("bbqd") == 1 ? "本部确定方案一" :
                                                   hdCollection.Get("bbqd") == 2 ? "本部确定方案二" :
                                                   hdCollection.Get("bbqd") == 3 ? "本部确定方案三" : "");
                tab4lblBanShiCFA.SetText(hdCollection.Get("bscqd") == 1 ? "办事处确定方案一" :
                                        hdCollection.Get("bscqd") == 2 ? "办事处确定方案二" :
                                        hdCollection.Get("bscqd") == 3 ? "办事处确定方案三" : "");
            //}
        }

        //异步回调接收事件
        function ASPxCallbackCommonComplete(e) {
            var rs = e.result;
            if (e.parameter == "DelUser") {
                alert(rs);
                tab2cmbChange();
                return;
            }

            var arr = rs.split('|');
            var type = arr[0];
            var state = arr[1];
            var specialIdentity = arr[2];
            var msg = arr[3].split('-');
            setBtnsEnable(true);
            LoadPanel.Hide();
            if (msg[0]=='True') {
                alert(msg[1]);
            }
            hdCollection.Set("type", type);
            if (state=='True') {
                if (type.indexOf("export") > -1)//操作为导出时
                {
                    //btnActPerformExport.onClick();
                    if (type == "exportNear3yers")
                    {
                        btnActPerformExport.onClick();
                    }
                    else
                    {
                        btnExport.OnClick();
                    }
                }
                else {                    
                    if (type == "validate_tab2Add") {
                        tab2opDisplay("add");
                    }
                    else if (type == "tab2Save") {
                        tab2opDisplay("init");
                        //重新绑定列表回调完成时定位记录,此时arr[3]为添加的用户号
                        tab2gvList1.PerformCallback(arr[4]);
                    }
                    else if (type == "rebuild")
                    {
                        hdCollection.Set("bbxy", tab3cmbBenBuFangA.GetSelectedIndex() == 0 ? "1" :
                                                tab3cmbBenBuFangA.GetSelectedIndex() == 1 ? "2" :
                                                tab3cmbBenBuFangA.GetSelectedIndex() == 2 ? "3" : "-1");
                        hdCollection.Set("bscxy", tab3cmbBanShiCFangA.GetSelectedIndex() == 0 ? "1" :
                                                tab3cmbBanShiCFangA.GetSelectedIndex() == 1 ? "2" :
                                                tab3cmbBanShiCFangA.GetSelectedIndex() == 2 ? "3" : "-1");
                    }
                    else if (type == "quedingfa")
                    {
                        var strT = "";
                        if (tab3cmbBenBuFangA.GetSelectedIndex()==0)
                        {
                            strT = "本部确定方案一";
                            hdCollection.Set("bbqd", "1");
                        }
                        else if (tab3cmbBenBuFangA.GetSelectedIndex()== 1) {
                            strT = "本部确定方案二";
                            hdCollection.Set("bbqd", "2");
                        }
                        else if (tab3cmbBenBuFangA.GetSelectedIndex() == 2) {
                            strT = "本部确定方案三";
                            hdCollection.Set("bbqd", "3");
                        }
                        tab3lblBenBuQDFA.SetText(strT);

                        if (tab3cmbBanShiCFangA.GetSelectedIndex() == 0) {
                            strT = "办事处确定方案一";
                            hdCollection.Set("bscqd", "1");
                        }
                        else if (tab3cmbBanShiCFangA.GetSelectedIndex() == 1) {
                            strT = "办事处确定方案二";
                            hdCollection.Set("bscqd", "2");
                        }
                        else if (tab3cmbBanShiCFangA.GetSelectedIndex() == 2) {
                            strT = "办事处确定方案三";
                            hdCollection.Set("bscqd", "3");
                        }
                        tab3lblBanShiCQDFA.SetText(strT);
                    }
                }
            }
            else {
                if (type == "validate_tab2Add" && specialIdentity == "-2") {
                    //已存在记录,跳至记录
                    tab2gvList1.SetFocusedRowIndex(arr[4]);
                    tab2gvList1.MakeRowVisible(arr[4]);
                }
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
            预编制计划
        </div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div style="display: none;">
                    <dx:ASPxButton ID="btnActPerform" ClientInstanceName="btnActPerform" runat="server" Text="ASPxButton" UseSubmitBehavior="false" OnClick="btnActPerform_Click"></dx:ASPxButton>
                    <dx:ASPxButton ID="btnActPerformExport" ClientInstanceName="btnActPerformExport" runat="server" Text="ASPxButton" UseSubmitBehavior="false"  OnClick="btnActPerformExport_Click"></dx:ASPxButton>
                </div>
                <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
                <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallbackCommonComplete(e);}"></dx:ASPxCallback>

                <dx:ASPxLoadingPanel ID="LoadPanel" ClientInstanceName="LoadPanel" runat="server" Text="正在操作..."></dx:ASPxLoadingPanel>
                <dx:ASPxPageControl ID="ASPxPageControl1" ClientInstanceName="ASPxPageControl1" runat="server" ActiveTabIndex="0" Width="98%" Height="545px" ClientSideEvents-ActiveTabChanged="function(s,e){tabChange();}">
                    <TabPages>
                        <dx:TabPage Text="计划执行情况">
                            <ContentCollection>
                                <dx:ContentControl>
                                    <div style="width: 100%;">
                                        <table border="0" style="width: 100%;">
                                            <tr>
                                                <td style="width: 50px;">
                                                    <dx:ASPxTextBox ID="tab1txtY" ClientInstanceName="tab1txtY" runat="server" Width="100%">
                                                        <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" LostFocus="function(s,e){
                                                                judgeYM();
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                                <td style="width: 13px; padding-left: 3px;">年
                                                </td>
                                                <td style="width: 30px;">
                                                    <dx:ASPxTextBox ID="tab1txtM" ClientInstanceName="tab1txtM" runat="server" Width="98%">
                                                        <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" LostFocus="function(s,e){
                                                                judgeYM();
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                                <td style="width: 100px;">月计划执行情况
                                                </td>
                                                <td></td>
                                                <td style="width: 80px; text-align: right">预测加价倍率
                                                </td>
                                                <td style="width: 30px;">
                                                    <dx:ASPxTextBox ID="tab1txtJIAJIABL" ClientInstanceName="tab1txtJIAJIABL" runat="server" Width="98%">
                                                        <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                                <td style="padding-left: 5px;">
                                                    <dx:ASPxButton ID="tab1btnRefresh" runat="server" Text="刷新" UseSubmitBehavior="False" AutoPostBack="false">
                                                        <ClientSideEvents Click="function(s,e){tab1btnRefresh();}" />
                                                    </dx:ASPxButton>
                                                </td>
                                                <td align="right">
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                <dx:ASPxButton ID="tab1btnExportExcel" ClientInstanceName="tab1btnExportExcel" runat="server" Text="导出到Excel" AutoPostBack="false" UseSubmitBehavior="False" ClientSideEvents-Click="function(s,e){tabexport(1);}">
                                                                    <ClientSideEvents Click="function(s,e){tabexport(1);}" />
                                                                </dx:ASPxButton>
                                                            </td>
                                                            <td>
                                                                <%--<dx:ASPxButton ID="tab1btnPrint" runat="server" Text="打印" UseSubmitBehavior="False" Visible="false"></dx:ASPxButton>--%>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    <dx:ASPxGridView ID="tab1gvList1" ClientInstanceName="tab1gvList1" runat="server" AutoGenerateColumns="False" KeyFieldName="部门" Theme="Aqua1" Width="100%" OnCustomCallback="tab1gvList1_CustomCallback">
                                        <Columns>
                                            <dx:GridViewDataTextColumn FieldName="部门" Caption="部门" Width="5.5%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="XXXX年计划量" Caption="2000年下达计划量" CellStyle-HorizontalAlign="Right" Width="10%">
                                                <CellStyle HorizontalAlign="Right">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="XXXX年实用量" Caption="2000年实用量" CellStyle-HorizontalAlign="Right" Width="10%">
                                                <CellStyle HorizontalAlign="Right">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="预测超计划水量" Caption="预测超用水量" CellStyle-HorizontalAlign="Right" Width="8.3%">
                                                <CellStyle HorizontalAlign="Right">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="预测超计划金额" Caption="预测超额" CellStyle-HorizontalAlign="Right" Width="8.3%">
                                                <CellStyle HorizontalAlign="Right">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="XXXX年考核计划" Caption="2000年考核计划量" CellStyle-HorizontalAlign="Right"  Width="10%">
                                                <CellStyle HorizontalAlign="Right">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="XXXX年X至X月实用量" Caption="2000年1~9月实用量" CellStyle-HorizontalAlign="Right" Width="10%">
                                                <CellStyle HorizontalAlign="Right">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="实际超计划水量" Caption="实际超用水量" CellStyle-HorizontalAlign="Right" Width="8.3%">
                                                <CellStyle HorizontalAlign="Right">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="实际超计划金额" Caption="实际超额" CellStyle-HorizontalAlign="Right" Width="8.3%">
                                                <CellStyle HorizontalAlign="Right">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="实际加价金额" Caption="实际加价额" CellStyle-HorizontalAlign="Right" Width="8.3%">
                                                <CellStyle HorizontalAlign="Right">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="推测全年超计划金额" Caption="推测全年超额" CellStyle-HorizontalAlign="Right" Width="10%">
                                                <CellStyle HorizontalAlign="Right">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="推测全年加价金额" Caption="推测全年加价额" CellStyle-HorizontalAlign="Right" Width="10%">
                                                <CellStyle HorizontalAlign="Right">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="推测剩余月超计划金额" Caption="推测剩余月超计划金额" Visible="false" CellStyle-HorizontalAlign="Right" Width="10%">
                                                <CellStyle HorizontalAlign="Right">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="未开帐月超计划金额" Caption="未开帐月超计划金额" Visible="false" CellStyle-HorizontalAlign="Right"  Width="10%">
                                                <CellStyle HorizontalAlign="Right">
                                                </CellStyle>
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                        <Settings VerticalScrollableHeight="420" VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" />
                                        <SettingsBehavior  AllowSort="false" ColumnResizeMode="Control"/>
                                    </dx:ASPxGridView>
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>
                        <dx:TabPage Text="特殊用户录入">
                            <ContentCollection>
                                <dx:ContentControl>
                                    <div style="width: 100%;">
                                        <table border="0" style="width: 100%;">
                                            <tr>
                                                <td style="width: 40px;">编制：
                                                </td>
                                                <td style="width: 70px;">
                                                    <dx:ASPxComboBox ID="tab2cmbY" runat="server" ValueType="System.String" ClientSideEvents-SelectedIndexChanged="function(s,e){tab2cmbChange();}" Width="100%">
                                                        <ClientSideEvents SelectedIndexChanged="function(s,e){tab2cmbChange();}" />
                                                    </dx:ASPxComboBox>
                                                </td>
                                                <td style="width: 40px;">计划
                                                </td>
                                                <td style="width: 40px;">类型：
                                                </td>
                                                <td style="width: 100px;">
                                                    <dx:ASPxComboBox ID="tab2cmbBZ" ClientInstanceName="tab2cmbBZ" runat="server" Width="100%" ClientSideEvents-SelectedIndexChanged="function(s,e){tab2cmbChange();}">
                                                        <ClientSideEvents SelectedIndexChanged="function(s,e){tab2cmbChange();}" />
                                                    </dx:ASPxComboBox>
                                                </td>
                                                <td style="width: 1px; white-space: nowrap">
                                                    <dx:ASPxLabel ID="tab2lblRowCount" ClientInstanceName="tab2lblRowCount" runat="server" Text="共有50条记录"></dx:ASPxLabel>
                                                </td>
                                                <td></td>
                                                <td style="width: 80px;"></td>
                                                <td align="right">
                                                    <dx:ASPxButton ID="tab2btnExportExcel" runat="server" Text="导出到Excel" AutoPostBack="false" UseSubmitBehavior="False" ClientSideEvents-Click="function(s,e){tabexport(2);}">
                                                        <ClientSideEvents Click="function(s,e){tabexport(2);}" />
                                                    </dx:ASPxButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    <dx:ASPxGridView ID="tab2gvList1" ClientInstanceName="tab2gvList1"  runat="server" AutoGenerateColumns="False" KeyFieldName="ID" Theme="Aqua1" Width="100%" OnCustomCallback="tab2gvList1_CustomCallback" >
                                        <Columns>
                                            <dx:GridViewDataTextColumn FieldName="S_YONGHUH" Caption="用户号" Width="10%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_YONGHUM" Caption="用户名" Width="30%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="JU" Caption="所属局" Width="30%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="YONGSHUIXZ" Caption="用水性质" Width="10%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_SHESHUIDXDM" Caption="行业类型" Width="15%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Width="5%">
                                                <DataItemTemplate>
                                                    <a href="#" onclick="delConfirm('<%#Eval("S_SHESHUIDXDM")%>','<%#Eval("ID")%>')">删除</a>
                                                </DataItemTemplate>
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                        <Settings VerticalScrollableHeight="390" VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto"  />
                                        <SettingsBehavior AllowFocusedRow="True"  ColumnResizeMode="Control" />
                                        <SettingsPager Visible="false"></SettingsPager>
                                        <ClientSideEvents EndCallback="function(s,e){tab2List1EndCallback(s);}" />
                                    </dx:ASPxGridView>
                                    <table style="width: 100%">
                                        <tr>
                                            <td style="width: 60px">用户号：
                                            </td>
                                            <td style="width: 140px">
                                                <dx:ASPxTextBox ID="tab2txtYonghuh" ClientInstanceName="tab2txtYonghuh" runat="server" Width="98%">
                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);var key = event.keyCode;
                                                        if( key==13){tab2Add();}}" />
                                                </dx:ASPxTextBox>
                                            </td>
                                            <td align="right">
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <table>
                                                                <tr>
                                                                    <td>
                                                                        <dx:ASPxButton ID="tab2btnAdd" ClientInstanceName="tab2btnAdd" runat="server" Text="增加" AutoPostBack="false" ClientSideEvents-Click="function(s,e){tab2Add();}" UseSubmitBehavior="False">
                                                                            <ClientSideEvents Click="function(s,e){tab2Add();}" />
                                                                        </dx:ASPxButton>
                                                                    </td>
                                                                    <td>
                                                                        <dx:ASPxButton ID="tab2btnSave" ClientInstanceName="tab2btnSave" runat="server" Text="保存" AutoPostBack="false" ClientSideEvents-Click="function(s,e){tab2Save();}" ClientVisible="false" UseSubmitBehavior="False">
                                                                            <ClientSideEvents Click="function(s,e){tab2Save();}" />
                                                                        </dx:ASPxButton>
                                                                    </td>
                                                                    <td>
                                                                        <dx:ASPxButton ID="tab2btnCancel" ClientInstanceName="tab2btnCancel" runat="server" Text="放弃" AutoPostBack="false" ClientSideEvents-Click="function(s,e){tab2opDisplay('init');}" ClientVisible="false" UseSubmitBehavior="False">
                                                                            <ClientSideEvents Click="function(s,e){tab2opDisplay('init');}" />
                                                                        </dx:ASPxButton>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </td>
                                                        <td>
                                                            <dx:ASPxButton ID="tab2btnCompareToFact" ClientInstanceName="tab2btnCompareToFact" runat="server" AutoPostBack="false" Text="与实际用户对照" UseSubmitBehavior="False" ClientSideEvents-Click="function(s,e){openCompareToFact();}">
                                                                <ClientSideEvents Click="function(s,e){openCompareToFact();}" />
                                                            </dx:ASPxButton>
                                                        </td>
                                                        <td>
                                                            <dx:ASPxButton ID="tab2btnRebuildData" runat="server" Text="重新生成数据" UseSubmitBehavior="true" ClientEnabled="false" AutoPostBack="false" ClientSideEvents-Click="function(s,e){tab2Rebuild();}">
                                                                <ClientSideEvents Click="function(s,e){tab2Rebuild();}" />
                                                            </dx:ASPxButton>

                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>
                        <dx:TabPage Text="预编制计划">
                            <ContentCollection>
                                <dx:ContentControl>
                                    <div style="width: 100%;">
                                        <div>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    <table>
                                                                        <tr>
                                                                            <th>
                                                                                <dx:ASPxTextBox ID="tab3txtY" ClientInstanceName="tab3txtY" runat="server" Width="35px">
                                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" LostFocus="function(s,e){
                                                                                if(tab3txtY.GetText().length==4)
                                                                                {
                                                                                    tab3lblTip1.SetText('月预设'+(Number(tab3txtY.GetText())+1)+'年计划');
                                                                                    tab3lblTip2.SetText('以'+Number(tab3txtY.GetText())+'年考核计划为计划基准');
                                                                                    tab3lblTip3.SetText((Number(tab3txtY.GetText())+1)+'计划='+Number(tab3txtY.GetText())+'实用×');
                                                                                    tab3lblTip4.SetText('%+'+(Number(tab3txtY.GetText())-1)+'实用×');
                                                                                    tab3lblTip5.SetText('%+'+(Number(tab3txtY.GetText())-2)+'实用×');
                                                                                }
                                                                            }" />
                                                                                </dx:ASPxTextBox>
                                                                            </th>
                                                                            <th>年
                                                                            </th>
                                                                            <th>
                                                                                <dx:ASPxTextBox ID="tab3txtM" ClientInstanceName="tab3txtM" runat="server" Width="20px">
                                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                                </dx:ASPxTextBox>
                                                                            </th>
                                                                            <th>
                                                                                <dx:ASPxLabel ID="tab3lblTip1" ClientInstanceName="tab3lblTip1" runat="server" Text="月预设2006年计划"></dx:ASPxLabel>
                                                                            </th>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <table>
                                                                        <tr>
                                                                            <td>1.宾馆、学校、医院计划实行定额编制。预编制时计划不增加，但符合计划扣减条件的同样进行扣减。
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <table>
                                                                        <tr>
                                                                            <td>2.福利、部队超计划，计划取实用进百吨，完成率<
                                                                            </td>
                                                                            <td>
                                                                                <dx:ASPxTextBox ID="tab3txtFULIWCLXX" ClientInstanceName="tab3txtFULIWCLXX" runat="server" Width="20px">
                                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                                </dx:ASPxTextBox>
                                                                            </td>
                                                                            <td>%
                                                                            </td>
                                                                            <td>令完成率=
                                                                            </td>
                                                                            <td>
                                                                                <dx:ASPxTextBox ID="tab3txtFULIWCL" ClientInstanceName="tab3txtFULIWCL" runat="server" Width="35px">
                                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                                </dx:ASPxTextBox>
                                                                            </td>
                                                                            <td>%
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <table>
                                                                        <tr>
                                                                            <td>3.用水单位未完成水平衡且超计划的,预编制时计划不增加,但符合计划扣减条件的同样进行扣减。
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <table>
                                                                        <tr>
                                                                            <td>4.分户、更改户号、试考核户，预编制时计划不调整。
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <table>
                                                                        <tr>
                                                                            <td>5.计划下限为办事处
                                                                            </td>
                                                                            <td>
                                                                                <dx:ASPxTextBox ID="tab3txtBANSHICXX" ClientInstanceName="tab3txtBANSHICXX" runat="server" Width="35px">
                                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                                </dx:ASPxTextBox>
                                                                            </td>
                                                                            <td>立方米，
                                                                            </td>
                                                                            <td>本部
                                                                            </td>
                                                                            <td>
                                                                                <dx:ASPxTextBox ID="tab3txtBENBUXX" ClientInstanceName="tab3txtBENBUXX" runat="server" Width="35px">
                                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                                </dx:ASPxTextBox>
                                                                            </td>
                                                                            <td>立方米。
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <table>
                                                                        <tr>
																			<td>6.
																			</td>
                                                                            <td>除水平衡未完成单位，最高月用水量小于等于2230立方米时，各月计划量按最高月用水量的130%计算；
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
																			<td>
																			</td>
                                                                            <td>最高月用水量大于2230立方米，若初算计划小于3000立方米。则令其等于3000立方米，反之不变。
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <table>
                                                                        <tr>
                                                                            <td>7.按
                                                                            </td>
                                                                            <td>
                                                                                <dx:ASPxTextBox ID="tab3txtJIAJIABL" ClientInstanceName="tab3txtJIAJIABL" runat="server" Width="20px">
                                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                                </dx:ASPxTextBox>
                                                                            </td>
                                                                            <td>倍加价倍率预测。
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                    <td>
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    <dx:ASPxLabel ID="tab3lblBenBuQDFA" ClientInstanceName="tab3lblBenBuQDFA" runat="server" Text="" Font-Size="Large" ForeColor="Blue"></dx:ASPxLabel>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <dx:ASPxLabel ID="tab3lblBanShiCQDFA" ClientInstanceName="tab3lblBanShiCQDFA" runat="server" Text="" Font-Size="Large" ForeColor="Blue"></dx:ASPxLabel>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div>
                                            <div style="float: left; width: 70%;">
                                                <fieldset>
                                                    <legend>方案一</legend>
                                                    <table>
                                                        <tr>
                                                            <td colspan="9">
                                                                <dx:ASPxLabel ID="tab3lblTip2" ClientInstanceName="tab3lblTip2" runat="server" Text="以2005年考核计划为计划基准:"></dx:ASPxLabel>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>1-
                                                            </td>
                                                            <td>
                                                                <dx:ASPxTextBox ID="tab3txtWANCHENGLYZ" ClientInstanceName="tab3txtWANCHENGLYZ" runat="server" Width="25px">
                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                </dx:ASPxTextBox>
                                                            </td>
                                                            <td>月完成率低于
                                                            </td>
                                                            <td>
                                                                <dx:ASPxTextBox ID="tab3txtWANCHENGLTJ" ClientInstanceName="tab3txtWANCHENGLTJ" runat="server" Width="25px">
                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                </dx:ASPxTextBox>
                                                            </td>
                                                            <td>%的月份>=
                                                            </td>
                                                            <td>
                                                                <dx:ASPxTextBox ID="tab3txtWANCHENGLYS" ClientInstanceName="tab3txtWANCHENGLYS" runat="server" Width="25px">
                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                </dx:ASPxTextBox>
                                                            </td>
                                                            <td>,令其完成率下限为
                                                            </td>
                                                            <td>
                                                                <dx:ASPxTextBox ID="tab3txtWANCHENGLXX" ClientInstanceName="tab3txtWANCHENGLXX" runat="server" Width="25px">
                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                </dx:ASPxTextBox>
                                                            </td>
                                                            <td>%
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>1-
                                                            </td>
                                                            <td>
                                                                <dx:ASPxTextBox ID="tab3txtCHAOYONGLYZ" ClientInstanceName="tab3txtCHAOYONGLYZ" runat="server" Width="25px">
                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                </dx:ASPxTextBox>
                                                            </td>
                                                            <td>月超用率高于
                                                            </td>
                                                            <td>
                                                                <dx:ASPxTextBox ID="tab3txtCHAOYONGLTJ" ClientInstanceName="tab3txtCHAOYONGLTJ" runat="server" Width="25px">
                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                </dx:ASPxTextBox>
                                                            </td>
                                                            <td>%的月份>=
                                                            </td>
                                                            <td>
                                                                <dx:ASPxTextBox ID="tab3txtCHAOYONGLYS" ClientInstanceName="tab3txtCHAOYONGLYS" runat="server" Width="25px">
                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                </dx:ASPxTextBox>
                                                            </td>
                                                            <td>,令其超用率上限为
                                                            </td>
                                                            <td>
                                                                <dx:ASPxTextBox ID="tab3txtCHAOYONGLSX" ClientInstanceName="tab3txtCHAOYONGLSX" runat="server" Width="25px">
                                                                    <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                </dx:ASPxTextBox>
                                                            </td>
                                                            <td>%
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </fieldset>
                                                <fieldset>
                                                    <legend>方案二</legend>
                                                    <table>
                                                        <caption style="text-align: left;">
                                                            以近三年实用量加权平均编制计划:</caption>
                                                        <tr>
                                                            <td>
                                                                <table>
                                                                    <tr>
                                                                        <td>
                                                                            <dx:ASPxLabel ID="tab3lblTip3" ClientInstanceName="tab3lblTip3" runat="server" Text="2006计划=2005实用×"></dx:ASPxLabel>
                                                                        </td>
                                                                        <td>
                                                                            <dx:ASPxTextBox ID="tab3txtJINNIANQ" ClientInstanceName="tab3txtJINNIANQ" runat="server" Width="25px">
                                                                                <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                            </dx:ASPxTextBox>
                                                                        </td>
                                                                        <td>
                                                                            <dx:ASPxLabel ID="tab3lblTip4" ClientInstanceName="tab3lblTip4" runat="server" Text="%+2004实用×"></dx:ASPxLabel>
                                                                        </td>
                                                                        <td>
                                                                            <dx:ASPxTextBox ID="tab3txtQUNIANQ" ClientInstanceName="tab3txtQUNIANQ" runat="server" Width="25px">
                                                                                <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                            </dx:ASPxTextBox>
                                                                        </td>
                                                                        <td>
                                                                            <dx:ASPxLabel ID="tab3lblTip5" ClientInstanceName="tab3lblTip5" runat="server" Text="%+2003实用×"></dx:ASPxLabel>
                                                                        </td>
                                                                        <td>
                                                                            <dx:ASPxTextBox ID="tab3txtQIANNIANQ" ClientInstanceName="tab3txtQIANNIANQ" runat="server" Width="25px">
                                                                                <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                            </dx:ASPxTextBox>
                                                                        </td>
                                                                        <td>%
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <table>
                                                                    <tr>
                                                                        <td>(若只有2年数据,这近一年比重为
                                                                        </td>
                                                                        <td>
                                                                            <dx:ASPxTextBox ID="tab3txtBENNIANQ" ClientInstanceName="tab3txtBENNIANQ" runat="server" Width="25px">
                                                                                <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                            </dx:ASPxTextBox>
                                                                        </td>
                                                                        <td>%,近二年比重为
                                                                        </td>
                                                                        <td>
                                                                            <dx:ASPxTextBox ID="tab3txtSHANGNIANQ" ClientInstanceName="tab3txtSHANGNIANQ" runat="server" Width="25px">
                                                                                <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                            </dx:ASPxTextBox>
                                                                        </td>
                                                                        <td>%)
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </fieldset>
                                                <fieldset>
                                                    <legend>方案三</legend>
                                                    <table>
                                                        <caption style="text-align: left;">
                                                            以近三年实用量平均编制计划,<asp:CheckBox ID="tab3cbCFLY" runat="server" Text="考虑重复利用率:" /></caption>
                                                        <tr>
                                                            <td>
                                                                <table>
                                                                    <tr>
                                                                        <td>若超计划
                                                                        </td>
                                                                        <td>
                                                                            <dx:ASPxTextBox ID="tab3txtCHAOJIHTJD" ClientInstanceName="tab3txtCHAOJIHTJD" runat="server" Width="60px">
                                                                                <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                            </dx:ASPxTextBox>
                                                                        </td>
                                                                        <td>-
                                                                        </td>
                                                                        <td>
                                                                            <dx:ASPxTextBox ID="tab3txtCHAOJIHTJZ" ClientInstanceName="tab3txtCHAOJIHTJZ" runat="server" Width="60px">
                                                                                <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                            </dx:ASPxTextBox>
                                                                        </td>
                                                                        <td>立方米,上限为
                                                                        </td>
                                                                        <td>
                                                                            <dx:ASPxTextBox ID="tab3txtCHAOJIHTJSX" ClientInstanceName="tab3txtCHAOJIHTJSX" runat="server" Width="60px">
                                                                                <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                            </dx:ASPxTextBox>
                                                                        </td>
                                                                        <td>立方米;
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <table>
                                                                    <tr>
                                                                        <td>超计划大于
                                                                        </td>
                                                                        <td>
                                                                            <dx:ASPxTextBox ID="tab3txtCHAOJIHTJG" ClientInstanceName="tab3txtCHAOJIHTJG" runat="server" Width="60px">
                                                                                <ClientSideEvents KeyUp="function(s,e){inputNum(s);}" />
                                                                            </dx:ASPxTextBox>
                                                                        </td>
                                                                        <td>立方米,超计划减半。
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </fieldset>
                                            </div>
                                            <div style="float: left; position: relative; left: 2%; width: 27%; padding-top: 12px;">
                                                <div class="divCircle" style="width: 100%;">
                                                    <table style="width: 100%;">
                                                        <caption>
                                                            <asp:CheckBox ID="tab3cbDingE" runat="server" Checked="true" Text="定额编制:" /></caption>
                                                        <tr>
                                                            <td align="right">本部选用：</td>
                                                            <td>
                                                                <dx:ASPxComboBox ID="tab3cmbBenBuFangA" ClientInstanceName="tab3cmbBenBuFangA" runat="server" ValueType="System.String" Width="80px">
                                                                    <Items>
                                                                        <dx:ListEditItem Text="方案一" Value="1" />
                                                                        <dx:ListEditItem Text="方案二" Value="2" />
                                                                        <dx:ListEditItem Text="方案三" Value="3" />
                                                                    </Items>
                                                                </dx:ASPxComboBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td align="right" style="white-space: nowrap">办事处选用：</td>
                                                            <td>
                                                                <dx:ASPxComboBox ID="tab3cmbBanShiCFangA"  ClientInstanceName="tab3cmbBanShiCFangA" runat="server" ValueType="System.String" Width="80px">
                                                                    <Items>
                                                                        <dx:ListEditItem Text="方案一" Value="1" />
                                                                        <dx:ListEditItem Text="方案二" Value="2" />
                                                                        <dx:ListEditItem Text="方案三" Value="3" />
                                                                    </Items>
                                                                </dx:ASPxComboBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2" align="center">
                                                                <dx:ASPxButton ID="tab3btnRebuilData" ClientInstanceName="tab3btnRebuilData" runat="server" Text="重新生成数据" UseSubmitBehavior="false"  Width="150px" AutoPostBack="false">
                                                                    <ClientSideEvents Click="function(s,e){rebuild(); }" />
                                                                </dx:ASPxButton>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2" align="center">
                                                                <dx:ASPxButton ID="tab3btnConfirm" ClientInstanceName="tab3btnConfirm" runat="server" Text="确定方案" UseSubmitBehavior="false"  Width="150px" AutoPostBack="false">
                                                                    <ClientSideEvents Click="function(s,e){quedingfa(); }" />
                                                                </dx:ASPxButton>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2" align="center">
                                                                <dx:ASPxLoadingPanel ID="ASPxLoadingPanel3" ClientInstanceName="LoadPanel3" runat="server" Text="正在操作"></dx:ASPxLoadingPanel>
                                                                <dx:ASPxButton ID="tab3btnExport" ClientInstanceName="tab3btnExport" runat="server" Text="导出预编制计划" Width="150px" AutoPostBack="false" UseSubmitBehavior="false" ClientSideEvents-Click="function(s,e){tabexport(3);}">
                                                                    <ClientSideEvents Click="function(s,e){tabexport(3);}" />
                                                                </dx:ASPxButton>
                                                            </td>
                                                        </tr>
                                                        <tr style="display:none">
                                                            <td colspan="2" align="center">
                                                                <dx:ASPxUploadControl ID="ASPxUploadControl1" ClientInstanceName="ASPxUploadControl1" Width="280px" UploadMode="Auto" runat="server" ClientVisible="false">
                                                                    <BrowseButton Text="浏览"></BrowseButton>
                                                                </dx:ASPxUploadControl>
                                                                <dx:ASPxButton ID="tab3btnInport" ClientInstanceName="tab3btnInport" runat="server" Text="导入预编制计划" UseSubmitBehavior="false"  Width="150px" AutoPostBack="false" ClientSideEvents-Click="function(s,e){tab3inport();}">                                                                   
                                                                    <ClientSideEvents Click="function(s,e){tab3inport();}" />
                                                                </dx:ASPxButton>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2" align="center">
                                                                <dx:ASPxButton ID="tab3btnExportShiYongSL" ClientInstanceName="tab3btnExportShiYongSL" runat="server" Text="导出近三年实用水量" Width="150px" UseSubmitBehavior="false"  AutoPostBack="false" ClientSideEvents-Click="function(s,e){exportNear3yers();}">
                                                                    <ClientSideEvents Click="function(s,e){exportNear3yers();}" />
                                                                </dx:ASPxButton>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>
                        <dx:TabPage Text="预测分析">
                            <ContentCollection>
                                <dx:ContentControl>
                                    <div>
                                        <table>
                                            <tr>
                                                <td>
                                                    <dx:ASPxComboBox ID="tab4cmbType" runat="server" ValueType="System.String" Width="140px" ClientSideEvents-SelectedIndexChanged="function(s,e){tab4gvList1.PerformCallback();}">
                                                        <ClientSideEvents SelectedIndexChanged="function(s,e){tab4gvList1.PerformCallback();}" />
                                                        <Items>
                                                            <dx:ListEditItem Text="方案预测" Value="0" Selected="true" />
                                                            <dx:ListEditItem Text="预编制计划预测" Value="1" />
                                                            <dx:ListEditItem Text="拟定/下达计划预测" Value="2" />
                                                            <dx:ListEditItem Text="考核计划年前预测" Value="3" />
                                                        </Items>
                                                    </dx:ASPxComboBox>
                                                </td>
                                                <td>
                                                    <dx:ASPxTextBox ID="tab4txtY" ClientInstanceName="tab4txtY" runat="server" Width="40px">
                                                        <ClientSideEvents KeyPress="function(s,e){if(e.keyCode==13){tab4gvList1.PerformCallback();}}" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                                <td>年</td>
                                            </tr>
                                        </table>
                                    </div>
                                    <div>
                                        <table style="width: 100%">
                                            <tr>
                                                <td style="width: 150px">
                                                    <dx:ASPxLabel ID="tab4lblBenBuFA" ClientInstanceName="tab4lblBenBuFA" runat="server" Text="本部选用方案0" Font-Size="Large" ForeColor="Black"></dx:ASPxLabel>
                                                </td>
                                                <td style="width: 50px"></td>
                                                <td style="width: 150px">
                                                    <dx:ASPxLabel ID="tab4lblBanShiCFA" ClientInstanceName="tab4lblBanShiCFA" runat="server" Text="办事处选用方案0" Font-Size="Large" ForeColor="Black"></dx:ASPxLabel>
                                                </td>
                                                <td style="text-align: right">
                                                    <dx:ASPxButton ID="tab4btnRefresh" runat="server" Text="刷新"  AutoPostBack="false" ClientSideEvents-Click="function(s,e){tab4gvList1.PerformCallback();}">
                                                        <ClientSideEvents Click="function(s,e){tab4gvList1.PerformCallback();}" />
                                                    </dx:ASPxButton>
                                                    <dx:ASPxButton ID="tab4btnExportToExcel" runat="server" Text="导出到Excel" AutoPostBack="false" ClientSideEvents-Click="function(s,e){tabexport(4);}">
                                                        <ClientSideEvents Click="function(s,e){tabexport(4);}" />
                                                    </dx:ASPxButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    <div style="height: 3px;"></div>
                                    <dx:ASPxGridView ID="tab4gvList1" ClientInstanceName="tab4gvList1" runat="server" AutoGenerateColumns="False" KeyFieldName="S_ZHANDIAN" Theme="Aqua1" Width="100%" OnCustomCallback="tab4gvList1_CustomCallback">
                                        <Columns>
                                            <dx:GridViewDataTextColumn FieldName="S_ZHANDIAN" Caption="部门" Width="10%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="I_PLAN" Caption="计划量" Width="11%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="I_PLANZJ" Caption="计划增减" Width="11%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="I_SYSL" Caption="实用量" Width="11%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="N_CJHJE" Caption="超计划金额" Width="11%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="I_JJHC" Caption="加价户次" Width="11%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="I_JJHS" Caption="加价户数" Width="11%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="I_ZPLANHS" Caption="增加计划户" Width="12%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="I_JPLANHS" Caption="减少计划户" Width="12%">
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                        <Settings VerticalScrollableHeight="380" VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" />
                                        <SettingsBehavior  AllowSort="false"/>
                                    </dx:ASPxGridView>
                                    <div>
                                        <dx:ASPxLabel ID="tab4lblTip" runat="server" Text="实用量已扣除基建量" Font-Size="Large" ForeColor="Red"></dx:ASPxLabel>
                                    </div>
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>
                    </TabPages>
                    <ClientSideEvents ActiveTabChanged="function(s,e){tabChange();}" />
                </dx:ASPxPageControl>
            </ContentTemplate>
        </asp:UpdatePanel>
        <div>
            <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server"></dx:ASPxGridViewExporter>
            <dx:ASPxButton ID="btnExport" ClientInstanceName="btnExport" ClientVisible="false" runat="server" Text="导出EXCEL" UseSubmitBehavior="false" OnClick="btnExport_Click">
            </dx:ASPxButton>
            <dx:ASPxButton ID="btnExport2" ClientInstanceName="btnExport2" ClientVisible="false" runat="server" Text="导出近三年实用水量" UseSubmitBehavior="false" OnClick="btnExport2_Click">
            </dx:ASPxButton>
            <dx:ASPxButton ID="btnExport3" ClientInstanceName="btnExport3" ClientVisible="false" runat="server" Text="导出预编制计划" UseSubmitBehavior="false" OnClick="btnExport3_Click">
            </dx:ASPxButton>
        </div>
    </form>
</body>
</html>


